<template>
  <div>
    <van-nav-bar title="我的购物车" left-arrow @click-left="$router.go(-1)" />
    <div class="box" >
      <van-card
        v-for="item in $store.state.mobile.cartList"
        :key="item.id"
        :num="item.num"
        :price="item.price"
        :title="item.name"
      >
        <template #thumb>
          <div class="thumb">
            <input type="checkbox" v-model="item.checkd" />
            <img :src="item.img" style="width: 80px" />
          </div>
        </template>
        <template #num>
          <van-stepper v-model="item.num" />
        </template>
      </van-card>
    </div>

    <van-submit-bar
      style="bottom: 50px"
      :price="totals * 100"
      button-text="提交订单"
    >
      <van-checkbox v-model="checked">全选</van-checkbox>
    </van-submit-bar>
  </div>
</template>

<script>
import { mapGetters } from "vuex";
export default {
  name: "",
  data() {
    return {
      checked: true,
    };
  },
  mounted() {},
  methods: {},
  computed: {
    ...mapGetters("mobile", ["totals"]),
  },
  watch: {},
};
</script>

<style scoped>
.thumb {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-right: 6px;
}
.box{
  padding-bottom: 100px;
}
</style>